<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Insert title here</title>
        <script type="text/javascript">
			function accesscookie(){
				alert(document.cookie);
			}
			function setCookie2(cookiename2,cookievalue2,cookiedate){
				document.cookie=cookiename2+"="+escape(cookievalue2);
				document.cookie="expires="+cookiedate.toGMTString();
			}
			function deleteCookie(cookiename){
				var newdate=new Date();
				newdate.setTime(newdate.getTime()-1);
				document.cookie=cookiename+"=deletedve;expires="+newdate.toGMTString();
			}
			function getCookieValue(allcookie,cookiename){
				if(allcookie.length<=0)return "";
				var start=allcookie.indexOf(cookiename+"=");
				if(start==-1){
					return "";
				}
				var end=allcookie.indexOf(";",start+1);
				if(end==-1){
					end=allcookie.length;
				}
				var cookievalue=allcookie.substring(start+cookiename.length+1,end);
				return cookievalue;
			}
        </script>
    </head>
    <body>
    	<form name="loginform" action="">
			<input type="button" value="access cookie" onclick="accesscookie();"/>
    	</form>
    </body>
</html>
